//
//  EMUser.h
//  EMMODaliy
//
//  Created by karry on 2020/4/25.
//  Copyright © 2020 miki. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface USCharacter : NSObject


@property (nonatomic, copy) NSString *characterId;//用户形象主键(编辑传)

@property (nonatomic, copy) NSString *sysHairstyleId;//头发
@property (nonatomic, copy) NSString *sysEyesId;//眼睛
@property (nonatomic, copy) NSString *sysAccessoryId;//配饰
@property (nonatomic, copy) NSString *sysFaceId;//脸部
@property (nonatomic, copy) NSString *sysMouthId;//嘴巴
@property (nonatomic, copy) NSString *sysCostumeId;//服饰
 
@end

@interface USUser : NSObject

@property (nonatomic, assign) BOOL isNew;

///头像
@property (nonatomic, copy) NSString *avatarUrl;
///生日
@property (nonatomic, copy) NSString *birthday;
///创建时间
@property (nonatomic, copy) NSString *createTime;
///邮箱
@property (nonatomic, copy) NSString *email;
///创建时间
@property (nonatomic, copy) NSString *gmtCreate;
///token
@property (nonatomic, copy) NSString *token;
///token
@property (nonatomic, copy) NSString *imToken;
///im的用户昵称
@property (nonatomic, copy) NSString *imUserName;
///是否是会员
@property (nonatomic, assign) BOOL isVip;
///登陆状态
@property (nonatomic, assign) BOOL loginStatus;
///登陆方式
@property (nonatomic, strong) NSString * loginType;//mobile ,WECHAT_OPEN , qq
///手机号
@property (nonatomic, copy) NSString *mobile; // 如果你希望手机号用字符串表示（更安全）
///昵称
@property (nonatomic, copy) NSString *nickname;
///聊天背景色
@property (nonatomic, copy) NSString *imColor;
///聊天背景图
@property (nonatomic, copy) NSString *imPhoto;
///聊天背景 0默认格子，1纯色，2自定义图片
@property (nonatomic, assign) NSInteger imBgType;
///注册id
@property (nonatomic, copy) NSString *registrationId;
///建立关系用户的昵称
@property (nonatomic, copy) NSString *relImUserName;
///是否建立关系 1,建立
@property (nonatomic, assign) NSInteger relStatus;
///建立关系的用户
@property (nonatomic, strong) NSString *relUserId;
///1情侣、2朋友
@property (nonatomic, assign) NSInteger relType;
///关系id
@property (nonatomic, assign) NSInteger relId;
///已聊天数
@property (nonatomic, assign) NSInteger chatDays;
///建立关系时间
@property (nonatomic, assign) NSInteger metTime;
///性别   0,///女1///男
@property (nonatomic, assign) NSInteger sex;
///空间id
@property (nonatomic, strong) NSString *sharedSpaceId;
@property (nonatomic, copy) NSString *sub;
///用户id
@property (nonatomic, strong) NSString *userId;
///用户名称
@property (nonatomic, copy) NSString *username;
///版本号
@property (nonatomic, copy) NSString *version;
///vip类型
@property (nonatomic, strong) NSNumber *vipType;

@property (nonatomic, copy) NSString *parts;

@property (nonatomic, strong) USUser *relUser;//建立关系的用户信息

@property (nonatomic, strong) NSString *sayToRel;

@property (nonatomic, strong) NSString *tarotCove;

//我的形象
@property (nonatomic, strong) USCartoonCharacter *character;

//对方的形象
@property (nonatomic, strong) USCartoonCharacter *relCharacter;

#pragma mark - 建议字段
//上次抽塔罗牌的时间
@property (nonatomic, strong) NSDate *lastDrawCardDate;
//上次回答的时间
@property (nonatomic, strong) NSDate *lastAnswerDate;

- (NSString *)sexDescription;

- (NSString *)birthdayDescription;

- (NSInteger)metTimeDescription;


+ (USUser *)user;

+ (BOOL)saveUser:(USUser *)user;

+ (BOOL)isLogin;

+ (BOOL)checkLoginFrom:(UIViewController *)viewController;

+ (void)cancelLogin;

///注销账户
+ (void)cancelUser;

///清楚账户信息并回到登录页
+ (void)cleanUserInfo;



/// 关注作者
/// @param authorId 作者id
/// @param isFocus 是否关注
/// @param block 关注结果
+ (void)foucsAuthor:(NSString *)authorId
            isFocus:(BOOL)isFocus
              block:(void(^)(BOOL success))block;

//清除缓存后，下次调用character 或者relcharacter会重新使用逻辑
- (void)clearCharacter;

@end


